package nc.ui.ar.badacc;

import java.util.List;
import java.util.Map;

import nc.ui.arap.service.IRemoteCallItem;
import nc.vo.arap.badacc.DstlCaseFactorVO;
import nc.vo.arap.service.ServiceVO;
import nc.vo.pub.BusinessException;

public class CaseFactorQueryCall implements IRemoteCallItem {

protected ServiceVO serviceVO=null;
	
	private String code;
	
	private String pk_dstlcase;
	
	private BadAccDstlCardPanel ui;
	
	public CaseFactorQueryCall(String pk_dstlcase, BadAccDstlCardPanel ui) {
		this.pk_dstlcase = pk_dstlcase;
		this.ui = ui;
	}

	public ServiceVO getServiceVO() {
		if(serviceVO==null){
			serviceVO = new ServiceVO();
			serviceVO.setClassname("nc.itf.arap.badacc.IArapDstlCaseQuery");
			serviceVO.setMethodname("queryCaseFactorls");
			serviceVO.setParamtype(new Class[] {String.class});
			serviceVO.setParam(new Object[] {pk_dstlcase});
			code = serviceVO.getCode();
		}
		return serviceVO;
	}

	@SuppressWarnings("unchecked")
	public void handleResult(Map<String, Object> datas)
			throws BusinessException {
		List<DstlCaseFactorVO> vo =(List<DstlCaseFactorVO>) datas.get(code);
		ui.setDstlCaseFactorVOs(vo);

	}

}
